<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Mr.Bao
  Date: 2021/11/16
  Time: 11:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>查询全部书籍</title>

    <style>
        *{
            margin: 0;
            padding: 0;
        }
        h3{
            width:180px;
            height: 38px;
        }
        td{
            padding: 0 10px;
        }
    </style>
</head>
<body>
<h1>书籍展示</h1>
<hr>
<div style="width: 100%;padding: 50px;background-color: beige">
    <table>
        <tr >
            <th>编号</th>
            <th>书名</th>
            <th>藏书量</th>
            <th>备注</th>
        </tr>
<%--        ${bookList}--%>
        <c:forEach items="${bookList}" var="item">
            <tr style="text-align: center">
                <td>${item.book_id}</td>
                <td>${item.book_name}</td>
                <td>${item.book_counts}</td>
                <td>${item.detail}</td>
                <td><a href="${pageContext.request.contextPath}/book/addOrUpdateBook/${item.book_id}">编辑</a></td>
                <td><a href="${pageContext.request.contextPath}/book/delete/${item.book_id}">删除</a><td>
            </tr>
        </c:forEach>
        <a href="${pageContext.request.contextPath}/book/addOrUpdateBook">
            添加 📖
        </a>
    </table>


</div>
</body>
</html>
